<template name="merchantHome">
	<!--{{#with merchant}}-->
	<div class="list-block media-list">
		<div class="item-link item-content">
			<div class="item-media"><img class="x7-merchantHome-circleImg" src="{{merchant.list_image.path}}" width="60" height="60"></div>
			<div class="item-inner x7-merchantHome-inner">
				<a href="/center">
					<div class="item-title-row">
						<div class="item-title">{{merchant.name}}</div>
					</div>
				</a>
				<div class="item-text">{{merchant.address}}</div>
			</div>
		</div>
	</div>
	<div class="x7-merchantHome-content">
		<div class="x7-merchantHome-subcontent">
			我的余额（元）：{{#if wallet}}{{#if gt wallet.last_money '0'}}{{wallet.last_money}}{{else}}0.00{{/if}}{{else}}0.00{{/if}}
		</div>
		<a href="/withdrawals" id="withdrawal" class="button active x7-merchantHome-button">提现</a>
	</div>

	<div class="x7-merchantHome-title">
		<div id="isCompany" class="contacts-content">
			<div class="list-block contacts-block">
				<div class="list-group">
					<div class="x7-merchantHome-subtitle x7-merchantHome-contact">
						<span>业务联系人信息</span>
					</div>
					<ul>
						<li class="x7-merchantHome-li">
							<div class="item-content">
								<div class="item-inner">
									<div class="item-title">
										<span class="x7-merchantHome-name">姓名：邢发诚</span>
										<span class="x7-merchantHome-phone">手机：18119793771</span>
										<a href="tel:18119793771" class="external" style="float:right; margin-right: 10px;">
            								<img src="img/calling.png" height="20" width="20">
 										</a>
									</div>
								</div>
							</div>
						</li>
					</ul>
				</div>
			</div>
		</div>
	</div>

	{{#if goodsList}}
	<div class="x7-merchantHome-goodsList">
		<div class="x7-merchantHome-subtitle x7-merchantHome-soldGoods">
			<div class="x7-merchantHome-contact">商品销量统计</div>
		</div>
		<!--显示商品销量，订阅商品集合-->
		{{#each goodsList}}
		<div id="isMonitor" class="x7-merchantHome-list">
			<div class="x7-merchantHome-titleName">{{name}}</div>
			<div class="x7-merchantHome-contentName">
				<div class="x7-merchantHome-imgName ">
					<img src="{{list_img.path}}" height="60" width="60">
				</div>
				<div class="x7-merchantHome-innerName">
					<div>原价：{{market_price}}</div>
					<div>实价：{{sell_price}}</div>
					<div>总销量：{{buy_number}}</div>
				</div>
			</div>
		</div>
		{{/each}} 
	</div>
	{{/if}}
	{{#if orderList}}
	<div class="x7-merchantHome-goodsList">
		<div class="x7-merchantHome-subtitle x7-merchantHome-soldGoods">
			<span class="x7-merchantHome-left">最新订单</span>
			<a href="/order" class="x7-merchantHome-right">查看更多</a>
		</div>
		{{#each orderList}}
		<div id="isMonitor" class="x7-merchantHome-list">
			<div class="x7-merchantHome-titleName">{{merchant.name}}</div>
			<div class="x7-merchantHome-contentName">
				<div class="x7-merchantHome-imgName">
					{{#if user.head_image}}
					<img src="{{user.head_image.path}}" height="60" width="60">
					{{else}}
					<img src="img/my.png" height="60" width="60">
					{{/if}}
				</div>
				<div class="x7-merchantHome-innerName">
					<div>实付：{{pay_fee}}</div>
					<div>时间：{{pay_time}}</div>
					<div>下单人：{{user.nick_name}}</div>
				</div>
			</div>
		</div>
		{{/each}}
	</div>
	{{/if}}
	
	{{#if capitalList}}
	<div class="contacts-content">
		<div class="list-block contacts-block">
			<div class="list-group">
				<div class="x7-merchantHome-subtitle">
					<span class="x7-merchantHome-left">最新提现记录</span>
					<a href="/capital" class="x7-merchantHome-right">查看更多</a>
				</div>

				<div class="x7-merchantHome-title">
					<ul>
						{{#each capitalList}}
						<li class="x7-merchantHome-li">
							<div class="item-content">
								<div class="item-inner">
									<div class="item-title">
										<span class="x7-merchantHome-name">金额(元):{{fee}}</span>
										<span class="x7-merchantHome-phone">时间：{{created_at}}</span>
									</div>
								</div>
							</div>
						</li>
						{{/each}}
					</ul>
				</div>
			</div>
		</div>
	</div>
	{{/if}}

</template>